/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.hitechbangla.fctu.drawingTools;

import fctu.simulator.HTB_MAIN;
import java.awt.Graphics;

/**
 *
 * @author HTB
 */
public class RectangleDrawable implements DrawableFigure {
    
    double firstPointX, firstPointY,secondPointX,secondPointY,height,width;
    
    public RectangleDrawable(double firstPointX, double firstPointY, double width, double height)
    {
        this.firstPointX = firstPointX;
        this.firstPointY = firstPointY;        
        this.width = width;
        this.height = height;
    }

    @Override
    public void draw(Graphics g) {
        //throw new UnsupportedOperationException("Not supported yet.");
        
        int fpX = (int) (firstPointX*HTB_MAIN.one_px_equivalent_naut);
        int fpY = (int) (firstPointY*HTB_MAIN.one_px_equivalent_naut);        
        int wdt = (int) (width*HTB_MAIN.one_px_equivalent_naut);
        int hgt = (int) (height*HTB_MAIN.one_px_equivalent_naut);
        
        g.drawRect(fpX, fpY, wdt, hgt);
    }
    
}
